<template>
  <div class="search-form">
    <el-form ref="form" :inline="true" :model="form">
      <el-form-item label="name">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
        <el-button @click="onReset">重置</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  props: {},
  data() {
    return {
      form: {
        name: "",
      },
    };
  },
  methods: {
    onSubmit() {
      this.$emit("onSubmit");
      //   this.$message("submit!");
    },
    onReset() {
      this.$emit("onReset");
      //   this.$message({
      //     message: "cancel!",
      //     type: "warning",
      //   });
    },
  },
};
</script>

<style scoped>
.line {
  text-align: center;
}
</style>
